package com.example.designModel.工厂方法.计算器;

import java.io.Console;

/**
 * XXXXXXXXX
 *
 * @author brad zhang
 * @version 2.0
 * @date 2021/11/17 16:47
 */
public class Program {

    public static void main(String[] args) throws Exception {
        FactoryMethod.IFactory operFactory = new AddFactory();
        Operation oper = operFactory.CreateOperation();
        oper.NumberA = 1;
        oper.NumberB = 2;
        double result=oper.GetResult();
        System.out.println(result);
    }
}
